package cn.tedu.buycradserver.mapper;

import cn.tedu.buycradserver.pojo.entity.Category;
import cn.tedu.buycradserver.pojo.vo.CategoryDetailVO;
import cn.tedu.buycradserver.pojo.vo.CategoryListltemVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface CategoryMapper extends BaseMapper<Category> {
    int insert(Category category);
    int deleteById(Long id);//
    int deleteByIds(Long...ids);//
    int count();//
    int countByName(String name);//
    int updateById(Category category);//
    int countByParentId(Long parentId);
    List<CategoryListltemVO> listByParentId(Long parentId);
    CategoryDetailVO getById(Long id);
}
